@extends('layout.home.master')
@section('content')
    <div class="tab-content">
        <div class="tab-pane fade active show" id="tabPaneOne" role="tabpanel">
            <div class="row listAlias">
                @foreach($lessons as $lesson)
                    <div class="col-12 col-md-6 col-xl-4">

                        <!-- Card -->
                        <div class="card">
                            <a href="{{route ('lesson.show',$lesson)}}">
                                <img height="200" src="{{$lesson['thumb']}}" alt="..." class="card-img-top">
                            </a>
                            <div class="card-body">
                                <div class="row align-items-center">
                                    <div class="col">

                                        <!-- Title -->
                                        <h4 class="card-title mb-2 name">
                                            <a href="{{route('lesson.show',$lesson)}}">{{$lesson['title']}}</a>
                                        </h4>

                                        <!-- Subtitle -->
                                        <p class="card-text small text-muted">
                                            {{$lesson->updated_at->diffForHumans()}}
                                        </p>

                                    </div>
                                </div> <!-- / .row -->

                            </div> <!-- / .card-body -->
                        </div>

                    </div>
                @endforeach
            </div> <!-- / .row -->
        </div>
        {{$lessons->links()}}
    </div>
@endsection
